package com.deyou.adapter;

import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.deyou.Constants;
import com.deyou.DeYouApplication;
import com.deyou.R;
import com.deyou.activity.HouseSearchActivity;
import com.deyou.model.CityBean;
import com.deyou.model.RegionListBean;
import com.zhy.autolayout.utils.AutoUtils;
import com.zhy.view.flowlayout.FlowLayout;
import com.zhy.view.flowlayout.TagAdapter;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by yangyuancheng on 2017/5/12.
 */

public class SearchCityAdapter extends TagAdapter {
    private Context mContext;
    private List<RegionListBean.City> cityList = new ArrayList<>();

    public SearchCityAdapter(Context context, List datas) {
        super(datas);
        this.mContext = context;
        cityList = datas;
    }


    @Override
    public View getView(FlowLayout parent, int position, Object o) {
        TextView textView = (TextView) LayoutInflater.from(mContext).inflate(R.layout.item_city_cell, parent, false);
        textView.setText(cityList.get(position).regionName);
        return textView;
    }
}
